Fix/Keep other layers' filters when switching#6840
Conversation
wait, i just tested this behaviour on my testserver, and it is working as you describe/wish for. Can you try it out and confirm that i understood correctly? :) Those other reports seem interesting and solvable - i was a bit out for bughunting and searched for everything regarding the filter function during the last year back - as your issues are older than then, i did not find them. I will take a shot at them - but a bit more patience is needed for new features, for now i want to contribute to make 3.10 more stable 👍 |
@meyerlor okay, i tested it on your server, and that’s exactly it - combining criteria in the filter regarding the same layer! in my tests, i noticed that when I switch the filter between different layers, upon returning to a layer where i had already applied a filter, the filter has been cleared. perhaps this is another filter improvement that is not within the scope of this PR... thank you very much for all the enthusiasm and the fantastic work you’ve been doing to improve the Lizmap project! |
Ah, sh**t, my bad - I did not have this PR build live on my server, but another one. Now it is "Live" and that is exactly the scope of this PR.
Always a pleasure to contribute! |
|
hi @meyerlor
sorry for the noise, but my new tests show this:
Are you sure you already have your PR running on your server? |
Ah, well spotted - the filter stays active ( no change on the map visible when changeing back to the first filtered layer), but the number is getting reset to total features, not filtered features! :) - fixed & live (for now) |
|
@meyerlor Brilliant! |
|
that's where i'm at currently - but will be different branch / PR (so don't get confused about what is working on my testserver and what is not, working there quite a bit 😄 ) |
|
@meyerlor the bug concerns 3.9. This fix should be available in version 3.9, right ? |
…e form filter panel (3liz#6772)
5d02444 to
0b3e5d7
Compare
|
moved to 3.9! |
|
Linked to #6846 needs to be discussed |


The form filter panel layer selector called deactivateFilter() on every change, which removed the filter already applied to the previously selected layer. Enabling a filter on a second layer therefore reset the first one.
Drop that call so each layer keeps its own filter, and recompute the selected layer's filter from filterConfig in launchLayerFilterTool() so the panel state stays consistent when switching back and forth.
Fixes #6772